package ge.telasi.tasks.ui.comp;

import javax.swing.JList;

/**
 * @author dimitri
 */
public class ListUtils {

    public static void setSelectionAtEnd(JList list) {
        javax.swing.ListModel model = list.getModel();
        int size = model.getSize();
        setSelectionAt(list, size - 1);
    }

    public static void setSelectionAt(JList list, int index) {
        list.setSelectedIndex(index);
    }

}
